package cn.hznc.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.lang.reflect.Array;
import java.util.List;
import java.util.Map;

@Getter
@Setter
@Table(name = "t_type")
@TableName(value = "t_type")
public class TypeEntity {
    /**
     * 系统id
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 类型名称
     */
    @Column(name = "type_name",type = MySqlTypeConstant.VARCHAR, length = 200)
    @TableField(value = "type_name")
    private String typeName;
//    /**
//     * 物料编码
//     */
//    @Column(name = "partno",type = MySqlTypeConstant.VARCHAR,length = 100)
//    @TableField(value = "partno")
//    private String partno;
    /**
     * 父类id
     */
    @Column(name = "parent_id",type = MySqlTypeConstant.INT,length = 11)
    @TableField(value = "parent_id")
    private Integer parentId;

    @TableField(select = false)
    private List<TypeEntity> children;

    @TableField(select = false)
    private Map scopedSlots;
}
